package com.blb.community.controller;

import com.blb.community.pojo.ResponseResult;
import com.blb.community.pojo.fourMenu.FourMenu;
import com.blb.community.service.IZyRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
public class ZyRoomController {

    @Autowired
    private IZyRoomService zyRoomService;

    @GetMapping("/room")
    public ResponseResult<List<FourMenu>> getFourMenu() {
        List<FourMenu> fourMenu = zyRoomService.getFourMenu();
        System.out.println(fourMenu);
        return ResponseResult.ok(fourMenu);
    }
}
